import { createStore, applyMiddleware } from "redux";
import { composeWithDevTools } from "@redux-devtools/extension";

// 引入 中间件
import { thunk } from "redux-thunk";
import logger from "redux-logger";

// 引入 reducer
import reducer from "./reducer";

// 创建 store
const store = createStore(
  reducer,
  composeWithDevTools(applyMiddleware(thunk, logger))
);

export default store;
